package com.ftg.learn.util;

import com.sun.org.apache.bcel.internal.generic.GETSTATIC;

/**
 * @author kangjx
 * @createTime 2022/8/4
 */
public class GetSex {

    public String abc(String str){
        if(str.equals("男")){
            System.out.println("列出所有男性");
            return "所有男生";
        }else if(str.equals("女")){
            System.out.println("列出所有男性");
            return "所有女生";
        }
        return "所有w ";
    }

    public String def(Sex sex){
        if(Sex.man == sex){
            System.out.println("列出所有男性");
            return "所有男生";
        }else if(Sex.woman == sex){
            System.out.println("列出所有男性");
            return "所有女生";
        }
        return "所有w ";
    }

    public static void main(String[] args) {
        GetSex get = new GetSex();
        get.def(Sex.man);
    }

}
